Release 10.1A: OpenEdge Development:
Programming Interfaces
Reporting information from two tables
The next step is to look at the orders for each selected customer. This information is in the Order table. Another
FOREACHinside the first accomplishes this task. For each iteration of the outer block, the inner block finds all the related information. TheWHEREclause establishes the relationship between the two tables.The code below from
i-10-07.pshows the nestedFOREACHblocks:
The output from this procedure (following) shows how the related information ends up grouped together:
![]()
Notice that for a single iteration of the Customer data, there may be several iterations of Order data. Earlier you learned that the default frame of an iterating control block is a down frame. When you nest control blocks, only the innermost block uses a down frame. The other blocks execute one iteration at a time. This default behavior lets the related information group together naturally with the iteration of the blocks.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |